package caiziyou.com.designpattern.adapter.objectdapter;
/**
 * 对象适配器模式
 * @author Administrator
 *
 */
public class VoltageAdapter implements IVoltage5V{

	private Voltage220V voltage220V;
	
	public VoltageAdapter(Voltage220V voltage220v) {
		super();
		voltage220V = voltage220v;
	}

	@Override
	public int output5V() {
		int srcV = voltage220V.output220V();
		int dstV = srcV/44;
		return dstV;
	}

	
}
